Skip to content

Enable workflows to request a TEE#2004

Merged
jmank88 merged 31 commits into
mainfrom
rtinianov_teeWorkflows
Jun 1, 2026
Merged

Enable workflows to request a TEE#2004
jmank88 merged 31 commits into
mainfrom
rtinianov_teeWorkflows

Conversation

@nolag
Copy link
Copy Markdown
Contributor

@nolag nolag commented Apr 28, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (11)

pkg/workflows/wasm/host (3)
  • ExecutionHelper — Type changed:
  - ExecutionHelper
  + github.com/smartcontractkit/chainlink-common/pkg/workflows/host.ExecutionHelper
)
  • ModuleBase — Type changed:
  - ModuleBase
  + github.com/smartcontractkit/chainlink-common/pkg/workflows/host.ModuleBase
)
  • ModuleV2 — Type changed:
  - ModuleV2
  + github.com/smartcontractkit/chainlink-common/pkg/workflows/host.Module
)
pkg/workflows/wasm/host.(*module) (1)
  • Execute — Type changed:
func(
  context.Context, 
  *github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ExecuteRequest, 
  ExecutionHelper
)
(*github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ExecutionResult, error)
pkg/workflows/wasm/host/mocks (7)
  • ModuleV2 — Type changed:
  - ModuleV2
  + github.com/smartcontractkit/chainlink-common/pkg/workflows/host/mocks.Module
)
  • ModuleV2_Close_Call — 🗑️ Removed

  • ModuleV2_Execute_Call — 🗑️ Removed

  • ModuleV2_Expecter — 🗑️ Removed

  • ModuleV2_IsLegacyDAG_Call — 🗑️ Removed

  • ModuleV2_Start_Call — 🗑️ Removed

  • NewModuleV2 — Type changed:

func(
  interface{Cleanup(func()); github.com/stretchr/testify/mock.TestingT}
)
*ModuleV2

✅ Compatible Changes (3)

package github (3)
  • com/smartcontractkit/chainlink-common/pkg/workflows/host — ➕ Added

  • com/smartcontractkit/chainlink-common/pkg/workflows/host/mocks — ➕ Added

  • com/smartcontractkit/chainlink-common/pkg/workflows/host/requirements_gen — ➕ Added


📄 View full apidiff report

@nolag nolag force-pushed the rtinianov_teeWorkflows branch from f98af19 to f4e51a4 Compare April 30, 2026 14:41
@nolag nolag force-pushed the rtinianov_teeWorkflows branch from f4e51a4 to 937bc20 Compare April 30, 2026 15:09
@nolag nolag force-pushed the rtinianov_teeWorkflows branch 2 times, most recently from 8441040 to da5bccc Compare May 1, 2026 13:26
@nolag nolag force-pushed the rtinianov_teeWorkflows branch 3 times, most recently from d5fedb0 to e01fae1 Compare May 1, 2026 17:56
@nolag nolag force-pushed the rtinianov_teeWorkflows branch from e01fae1 to 8e8598d Compare May 1, 2026 19:13
@nolag nolag changed the title Rtinianov tee workflows Enable workflows to request a TEE May 20, 2026
@nolag nolag marked this pull request as ready for review May 20, 2026 19:34
@nolag nolag requested a review from a team as a code owner May 20, 2026 19:34
russell-stern
russell-stern previously approved these changes Jun 1, 2026
func SendSubscription(subscriptions *sdk.TriggerSubscriptionRequest) {
execResult := &sdk.ExecutionResult{Result: &sdk.ExecutionResult_TriggerSubscriptions{TriggerSubscriptions: subscriptions}}
sendResponse(BufferToPointerLen(Must(proto.Marshal(execResult))))
os.Exit(0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this for testing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it should have been there the whole time. Other tests just didn't do anything after calling it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you leave a comment explaining? This doesn't make any sense to me without context

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SendError function above it does the same thing.

It's a very dumbed down version of this code in the real SDK.

The internal one here is for bootstrapping, we can test the standard tests work, and that we can do things correctly with modules without needing the SDK.

The SDK needs the standard tests to verify correct behaviour, so we can't create a circular dependency. Also, the goal is to test the host/guest interactions at a lower level to ensure it works before we ask the SDKs to implement it for their language

Comment thread pkg/workflows/host/tee_selection_provider.go
Comment thread pkg/workflows/artifacts/utils.go Outdated
Comment thread pkg/workflows/artifacts/utils.go Outdated
@jmank88 jmank88 requested a review from erikburt June 1, 2026 15:26
@jmank88
Copy link
Copy Markdown
Contributor

jmank88 commented Jun 1, 2026

@erikburt Is API Diff failing here? These aliases are meant to be 100% compatible.

Edit: Wait, did it correct itself? maybe I just saw a stale comment

Comment thread pkg/capabilities/v2/protoc/pkg/template_generator.go Outdated
@nolag nolag requested a review from jmank88 June 1, 2026 15:51
jmank88
jmank88 previously approved these changes Jun 1, 2026
@jmank88
Copy link
Copy Markdown
Contributor

jmank88 commented Jun 1, 2026

@erikburt Is API Diff failing here? These aliases are meant to be 100% compatible.

Edit: Wait, did it correct itself? maybe I just saw a stale comment

Oh actually it is updating the two comments separately I guess? That may be confusing. But the main problem is that aliases seem to show as breaking.

@jmank88 jmank88 enabled auto-merge June 1, 2026 16:10
@jmank88 jmank88 added this pull request to the merge queue Jun 1, 2026
Merged via the queue into main with commit 5b4f632 Jun 1, 2026
31 of 33 checks passed
@jmank88 jmank88 deleted the rtinianov_teeWorkflows branch June 1, 2026 16:34
silaslenihan pushed a commit that referenced this pull request Jun 2, 2026
* Add TeeEnabled to template generator, and add a new requirements callback

* Add region

* Requirements selecting runner

* update proto and fix requirement not met test

* Update proto, allow individual triggers to choose where to run

* Add max time for requirements selection

* Use subscription for the trigger requirement

* Main module satisfies requirements

* remove unused hook from module, the selecting one is now responsible for the decision

* Hook to ask implementation to determine if it supports regions

* Update protos to use full TEE requirement and not use bytes for the embedded request

* Send full requirements to modules that accept them

* Regions with any is allowed too, and let the TEE say everything it is, not just region.

* Update protos for unknown TEE Type

* Fix misc tests that were fixed on a different branch, update to use protos from the cap-devs

* Remove file left from prior genreation and update to use the one from the public package

* AI feedback addressed

* Pin artifacts test build

* Undo whitespaces changes to unrealated files

* Cleaner go version pinning

* Undo whitespaces changes to unrealated files

* Use slices.Contains in template_generator

* Undo whitespaces changes to unrealated files

* Revert whitespace changes for real...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants